clc,clear
prob = optimproblem('ObjectiveSence','max');
x = optimvar('x',6,4,'TYPE','integer','LowerBound',0,'Upperbound',1);
c = [4 2 3 4
    6 4 5 5 
    7 6 7 6
    7 8 8 6
    7 9 8 6
    7 10 8 6];
M = c.*x;
prob.Objective = sum(sum(M));
prob.Constraints.con2 = sum(x) >= 1;
prob.Constraints.con1 = sum(x,2) == 1;
[sol,flav,flag] = solve(prob);
xx = sol.x
sum(sum(c.*xx))
